package controllers;

import java.io.IOException;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;

import models.AfforestationType;
import models.Compartment;
import models.Forest;
import models.State;

import org.codehaus.jackson.node.ObjectNode;


import play.*;

import play.db.ebean.Model.Finder;
import play.mvc.*;
import play.mvc.BodyParser.Json;

import util.RewriteDataBase;
import views.html.*;

public class Application extends Controller {
	public static Result index(){
		return ok("welcome to ani_forespring!");
	}
    public static Result rewiteDataBase(){
    	try {
			RewriteDataBase.rewriteDataBase();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    	return ok();
    }
}